str1 = 'iamgundam'
it = iter(str1)

# while True:
#     try:
#         each = next(it)
#     except StopIteration:
#         break
#     print(each)

try:

    with open('test.txt') as f:
        data = f.read()
        print(data)
except IOError as e:
    print('error---',e)